<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <link rel="icon" href="/img/logo.png">
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/font-awesome.css" rel="stylesheet">
    <link href="/css/animate.css" rel="stylesheet">
    <link href="/css/style.css" rel="stylesheet">
    <link rel="stylesheet" href="/css/layui.css"  media="all">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script>if(window.top !== window.self){ window.top.location = window.location;}</script>
</head>

<body class="gray-bg">
    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div onclick="toIndex()" style="cursor: pointer;">
                <img class="logo" src="/img/logo.png">
            </div>
            <h3>欢迎使用万里行系统</h3>
            <form class="m-t layui-form" role="form">
                <div class="form-group">
                    <input type="username" id="userName" class="form-control" placeholder="用户名" required="" th:value="${session.regUser}" >
                </div>
                <div class="form-group">
                    <input type="password" id="password" class="form-control" placeholder="密码" required="">
                </div>
                <div class="form-group">
                    <div class="layui-input-inline">
                        <input type="text" id="req-code-input" name="reqCode" lay-verify="required|phone" autocomplete="off" required="" placeholder="验证码" class="layui-input">
                    </div>
                    <img style="width: 110px;height: 36px;" id="req-code-img" th:src="@{/user/reCode}" onClick="this.src=this.src+'?'+Math.random();">
                </div>
                <div class="msg-box-container" style="color: #FF0000;font-size: 12px;">
                    <span class="msg-box" id="msg-box" hidden="hidden">账户名或密码错误</span>
                </div>
                <div class="layui-form-item" pane="">
                    <div class="layui-input-block" id="capacity" style="margin-left: 0">
                        <input type="radio" name="capacity" id="capacityUser" value="user" title="用户" checked="">
                        <input type="radio" name="capacity" id="capacityAdmin" value="admin" title="管理员">
                    </div>
                </div>
                <button type="button" class="btn btn-primary block full-width m-b" onclick="doLogin()">登 录</button>
                <p class="text-muted text-center"> <a href="login.html#"><small>忘记密码了？</small></a> | <a th:href="@{/register.html}">注册一个新账号</a>
                </p>
            </form>
        </div>
    </div>
    <!-- 全局js -->
    <script src="/js/bootstrap.min.js"></script>
    <script th:src="@{/js/jquery-3.3.1.min.js}" charset="utf-8"></script>
    <script src="/js/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/js/index.js"></script>
</body>

</html>
